/**
 * <pre>
 * Copyright:		Copyright(C) 2011-2012, ketayao.com
 * Filename:		SingleThreadedExecution.ketayao.ThisClassThread.java
 * Class:			ThisClassThread
 * Date:			2012-10-17
 * Author:			<a href="mailto:ketayao@gmail.com">ketayao</a>
 * Version          1.1.0
 * Description:		
 *
 * </pre>
 **/
 
package SingleThreadedExecution.ketayao;

/** 
 * 	
 * @author 	<a href="mailto:ketayao@gmail.com">ketayao</a>
 * Version  1.1.0
 * @since   2012-10-17 下午5:42:55 
 */

public class ThisClassThread extends Thread {
	private ThisClass thisClass;
	
	public ThisClassThread(ThisClass thisClass) {
		this.thisClass = thisClass;
	}

	/**   
	 *   
	 * @see java.lang.Thread#run()  
	 */
	@Override
	public void run() {
		while (true) {
			thisClass.enter();
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
	}
}
